package com.niit.order.pojo;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用来演示Feign调用的Order对象
 *
 * @author yaojianfeng
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class FeignOrder extends Order{
    private com.niit.feign.pojo.User feignUser;

    /**
     * 将Order转化为FeignOrder
     * @param order 原始Order实例
     */
    public FeignOrder(Order order) {
        this.setId(order.getId());
        this.setName(order.getName());
        this.setNum(order.getNum());
        this.setPrice(order.getPrice());
        this.setUserId(order.getUserId());
    }

    public FeignOrder() {
    }
}
